<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/project-OA/static/css/ztree/zTreeStyle/zTreeStyle.css" rel="stylesheet">
<script src="/project-OA//static/plugins/jquery/jquery.js"></script>
<script src="/project-OA/static/plugins/ztree/jquery.ztree.all.js"></script>
<title>Insert title here</title>
<script>
var setting={
		data:{
			simpleData:{
				enable:true,
				idKey:"id",
				pIdKey:"parentId",
				rootId:""
			}
		}
}		


	$.ajax({
		url:"getDocuments",
		type:"get",
		dataType:"json",
		success:function(json){
			$.fn.zTree.init($("#demo"),setting,json);
		}
	})


	
</script>
</head>
<body>
	<ul class="ztree" id="demo"></ul>
		<thead>
						<tr>
							<th>#</th>
							<th>标题</th>
							<th>内容</th>
							<th>创建者</th>
							<th>发布部门</th>
							<th>发布时间</th>
						</tr>
					</thead>
					<tbody>				
						<c:forEach var="paper" items="${announcement}">
							<tr>
								<td>${paper.id}</td>
								<td><a href="paperDetail?id="${paper.id}">${paper.title}</a></td>
								<td>${paper.content}</td>
								<td>${papaer.creator }</td>
								<td>${papaer.department }</td>
								<td>${papaer.createTime }</td>
							</tr>
						</c:forEach>
					</tbody>
</body>
</html>